package com.jmyd.txlcn.base.dto;

/**
 * 分页参数对象，适用于所有GET分页请求
 *
 * @author samphin
 * @date 2021-6-29 11:53:34
 */
public class PageParam {
    /**
     * 当前页码
     */
    private Integer pageNum = 1;

    /**
     * 页大小
     */
    private Integer pageSize = 10;

    public void setPageNum(Integer pageNum) {
        this.pageNum = (null == pageNum || pageNum <= 0) ? 1 : pageNum;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = (null == pageSize || pageSize <= 0 || pageSize > 500) ? 10 : pageSize;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }
}
